package org.monkey.example.pay.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.monkey.example.pay.entity.dto.UserAmountDto;


@Data
@TableName(value = "test_user_amount")
@NoArgsConstructor
public class UserAmountPo {

  @TableId(type = IdType.AUTO)
  private Long id;


  private Long accountId;

  private BigDecimal totalAmount;

  public UserAmountPo(UserAmountDto userAmountDto) {
    this.id = userAmountDto.getId();
    this.accountId = userAmountDto.getAccountId();
    this.totalAmount = userAmountDto.getTotalAmount();
  }
}
